
package entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;



/**
 *
 * @author Chenhui
 */
@Entity
public class EquityEntity  extends FinancialInstrumentEntity{
    
    @Id    
    private String id;
    private int share;
    private float pricePerShare;
    
    public EquityEntity(){}
    
    public void create(String id,int share,float price){
        this.setId(id);
        this.setShare(share);
        this.setPricePerShare(price);
    }

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * @return the share
     */
    public int getShare() {
        return share;
    }

    /**
     * @param share the share to set
     */
    public void setShare(int share) {
        this.share = share;
    }

    /**
     * @return the pricePerShare
     */
    public float getPricePerShare() {
        return pricePerShare;
    }

    /**
     * @param pricePerShare the pricePerShare to set
     */
    public void setPricePerShare(float pricePerShare) {
        this.pricePerShare = pricePerShare;
    }
    
}
